<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>请登录账号</title>
</head>

<body>
  <webview id="foo" src="https://login.taobao.com/member/login.jhtml?style=mini&newMini2=true&css_style=alimama&from=alimama&redirectURL=http%3A%2F%2Fwww.alimama.com&full_redirect=true&disableQuickLogin=true"
    allowpopups="on" plugins="on" style="height: 500px; margin-top: 30px;">
  </webview>
  <script>
    onload = function () {
      const ipcRenderer = require('electron').ipcRenderer;
      var webview = document.getElementById("foo");
      
      webview.addEventListener('new-window', function (e) {
        require('electron').shell.openExternal(e.url);
      });
       webview.addEventListener('will-navigate', function () {
        ipcRenderer.send('minLogin');
      })
      webview.addEventListener('did-navigate', function () {
        ipcRenderer.send('get_ses');
      })
    }
  </script>

</body>

</html>